<template>
    <el-input
        class="searchInput"
        prefix-icon="el-icon-search"
        v-model="searchVal"
        placeholder="搜索IP...">
    </el-input>
</template>

<script>
import bus from '../bus.js';

export default {
    data() {
        return {
            searchVal: ''
        };
    },
    methods: {
        clearSearchVal() {
            this.searchVal = '';
        }
    },
    watch: {
        'searchVal': function (newVal, oldVal) {
            this.$emit('searchVal', this.searchVal);
        }
    },
}
</script>
<style scoped>
    .searchInput {
        width: 300px;
        margin-right: 14px;
    }
</style>